'use strict';

module.exports = {
  up: async (queryInterface, Sequelize) => {
    /**
     * Add seed commands here.
     *
     * Example:
     * await queryInterface.bulkInsert('People', [{
     *   name: 'John Doe',
     *   isBetaMember: false
     * }], {});
    */
    return queryInterface.sequelize.transaction(async t => {
      await queryInterface.bulkInsert("sys_dict_data", [
        {
          dict_code:1,
          dict_sort:1,
          dict_label:"男",
          dict_value:"0",
          dict_type:"sys_user_sex",
          css_class:"",
          list_class:"",
          is_default:"Y",
          status:"0",
          create_by:"admin",
          update_by:"admin",
          remark:"性别男"
        },{
          dict_code:2,
          dict_sort:2,
          dict_label:"女",
          dict_value:"1",
          dict_type:"sys_user_sex",
          css_class:"",
          list_class:"",
          is_default:"N",
          status:"0",
          create_by:"admin",
          update_by:"admin",
          remark:"性别男"
        },{
          dict_code:3,
          dict_sort:3,
          dict_label:"未知",
          dict_value:"2",
          dict_type:"sys_user_sex",
          css_class:"",
          list_class:"",
          is_default:"Y",
          status:"0",
          create_by:"admin",
          update_by:"admin",
          remark:"性别未知"
        },{
          dict_code:4,
          dict_sort:1,
          dict_label:"显示",
          dict_value:"0",
          dict_type:"sys_show_hide",
          css_class:"",
          list_class:"primary",
          is_default:"Y",
          status:"0",
          create_by:"admin",
          update_by:"admin",
          remark:"显示菜单"
        },{
          dict_code:5,
          dict_sort:2,
          dict_label:"隐藏",
          dict_value:"1",
          dict_type:"sys_show_hide",
          css_class:"",
          list_class:"danger",
          is_default:"N",
          status:"0",
          create_by:"admin",
          update_by:"admin",
          remark:"隐藏菜单"
        },{
          dict_code:6,
          dict_sort:1,
          dict_label:"正常",
          dict_value:"0",
          dict_type:"sys_normal_disable",
          css_class:"",
          list_class:"primary",
          is_default:"Y",
          status:"0",
          create_by:"admin",
          update_by:"admin",
          remark:"正常状态"
        },{
          dict_code:7,
          dict_sort:2,
          dict_label:"停用",
          dict_value:"1",
          dict_type:"sys_normal_disable",
          css_class:"",
          list_class:"danger",
          is_default:"N",
          status:"0",
          create_by:"admin",
          update_by:"admin",
          remark:"性别男"
        },{
          dict_code:8,
          dict_sort:1,
          dict_label:"正常",
          dict_value:"0",
          dict_type:"sys_job_status",
          css_class:"",
          list_class:"primary",
          is_default:"Y",
          status:"0",
          create_by:"admin",
          update_by:"admin",
          remark:"正常状态"
        },{
          dict_code:9,
          dict_sort:2,
          dict_label:"暂停",
          dict_value:"1",
          dict_type:"sys_job_status",
          css_class:"",
          list_class:"danger",
          is_default:"N",
          status:"0",
          create_by:"admin",
          update_by:"admin",
          remark:"停用状态"
        },{
          dict_code:10,
          dict_sort:1,
          dict_label:"默认",
          dict_value:"DEFAULT",
          dict_type:"sys_job_group",
          css_class:"",
          list_class:"",
          is_default:"Y",
          status:"0",
          create_by:"admin",
          update_by:"admin",
          remark:"默认分组"
        },{
          dict_code:11,
          dict_sort:2,
          dict_label:"系统",
          dict_value:"SYSTEM",
          dict_type:"sys_job_group",
          css_class:"",
          list_class:"",
          is_default:"N",
          status:"0",
          create_by:"admin",
          update_by:"admin",
          remark:"性别男"
        },{
          dict_code:12,
          dict_sort:1,
          dict_label:"是",
          dict_value:"Y",
          dict_type:"sys_yes_no",
          css_class:"",
          list_class:"primary",
          is_default:"Y",
          status:"0",
          create_by:"admin",
          update_by:"admin",
          remark:"系统默认是"
        },{
          dict_code:13,
          dict_sort:2,
          dict_label:"否",
          dict_value:"N",
          dict_type:"sys_yes_no",
          css_class:"",
          list_class:"",
          is_default:"N",
          status:"0",
          create_by:"admin",
          update_by:"admin",
          remark:"系统默认否"
        },{
          dict_code:14,
          dict_sort:1,
          dict_label:"通知",
          dict_value:"1",
          dict_type:"sys_notice_type",
          css_class:"",
          list_class:"warning",
          is_default:"Y",
          status:"0",
          create_by:"admin",
          update_by:"admin",
          remark:"通知"
        },{
          dict_code:15,
          dict_sort:2,
          dict_label:"公告",
          dict_value:"2",
          dict_type:"sys_notice_type",
          css_class:"",
          list_class:"success",
          is_default:"N",
          status:"0",
          create_by:"admin",
          update_by:"admin",
          remark:"公告"
        },{
          dict_code:16,
          dict_sort:1,
          dict_label:"正常",
          dict_value:"0",
          dict_type:"sys_notice_status",
          css_class:"",
          list_class:"primary",
          is_default:"Y",
          status:"0",
          create_by:"admin",
          update_by:"admin",
          remark:"正常状态"
        },{
          dict_code:17,
          dict_sort:2,
          dict_label:"关闭",
          dict_value:"1",
          dict_type:"sys_notice_status",
          css_class:"",
          list_class:"danger",
          is_default:"N",
          status:"0",
          create_by:"admin",
          update_by:"admin",
          remark:"正常状态"
        },{
          dict_code:18,
          dict_sort:99,
          dict_label:"其他",
          dict_value:"0",
          dict_type:"sys_oper_type",
          css_class:"",
          list_class:"info",
          is_default:"N",
          status:"0",
          create_by:"admin",
          update_by:"admin",
          remark:"其他操作"
        },{
          dict_code:19,
          dict_sort:1,
          dict_label:"新增",
          dict_value:"1",
          dict_type:"sys_oper_type",
          css_class:"",
          list_class:"info",
          is_default:"N",
          status:"0",
          create_by:"admin",
          update_by:"admin",
          remark:"新增操作"
        },{
          dict_code:20,
          dict_sort:2,
          dict_label:"修改",
          dict_value:"2",
          dict_type:"sys_oper_type",
          css_class:"",
          list_class:"info",
          is_default:"N",
          status:"0",
          create_by:"admin",
          update_by:"admin",
          remark:"修改操作"
        },{
          dict_code:21,
          dict_sort:3,
          dict_label:"删除",
          dict_value:"3",
          dict_type:"sys_oper_type",
          css_class:"",
          list_class:"danger",
          is_default:"N",
          status:"0",
          create_by:"admin",
          update_by:"admin",
          remark:"删除操作"
        },{
          dict_code:22,
          dict_sort:4,
          dict_label:"授权",
          dict_value:"4",
          dict_type:"sys_oper_type",
          css_class:"",
          list_class:"primary",
          is_default:"N",
          status:"0",
          create_by:"admin",
          update_by:"admin",
          remark:"授权操作"
        },{
          dict_code:23,
          dict_sort:5,
          dict_label:"导出",
          dict_value:"5",
          dict_type:"sys_oper_type",
          css_class:"",
          list_class:"warning",
          is_default:"N",
          status:"0",
          create_by:"admin",
          update_by:"admin",
          remark:"导出操作"
        },{
          dict_code:24,
          dict_sort:6,
          dict_label:"导入",
          dict_value:"6",
          dict_type:"sys_oper_type",
          css_class:"",
          list_class:"warning",
          is_default:"N",
          status:"0",
          create_by:"admin",
          update_by:"admin",
          remark:"导入操作"
        },{
          dict_code:25,
          dict_sort:7,
          dict_label:"强退",
          dict_value:"7",
          dict_type:"sys_oper_type",
          css_class:"",
          list_class:"danger",
          is_default:"N",
          status:"0",
          create_by:"admin",
          update_by:"admin",
          remark:"强退操作"
        },{
          dict_code:26,
          dict_sort:8,
          dict_label:"生成代码",
          dict_value:"8",
          dict_type:"sys_oper_type",
          css_class:"",
          list_class:"warning",
          is_default:"N",
          status:"0",
          create_by:"admin",
          update_by:"admin",
          remark:"生成操作"
        },{
          dict_code:27,
          dict_sort:9,
          dict_label:"清空数据",
          dict_value:"9",
          dict_type:"sys_oper_type",
          css_class:"",
          list_class:"danger",
          is_default:"N",
          status:"0",
          create_by:"admin",
          update_by:"admin",
          remark:"清空操作"
        },{
          dict_code:28,
          dict_sort:1,
          dict_label:"成功",
          dict_value:"0",
          dict_type:"sys_common_status",
          css_class:"",
          list_class:"primary",
          is_default:"N",
          status:"0",
          create_by:"admin",
          update_by:"admin",
          remark:"正常状态"
        },{
          dict_code:29,
          dict_sort:2,
          dict_label:"失败",
          dict_value:"1",
          dict_type:"sys_common_status",
          css_class:"",
          list_class:"danger",
          is_default:"N",
          status:"0",
          create_by:"admin",
          update_by:"admin",
          remark:"停用状态"
        }
      ], { transaction: t });
    })
  },

  down: async (queryInterface, Sequelize) => {
    /**
     * Add commands to revert seed here.
     *
     * Example:
     * await queryInterface.bulkDelete('People', null, {});
     */
    return queryInterface.sequelize.transaction(async t => {
      return await queryInterface.bulkDelete("sys_dict_data", null, { transaction: t });
    })
  }
};
